package com.tjc.spring.core.resource;

import java.io.IOException;
import java.io.InputStream;

/**
 * @Author: tjc
 * @description
 * @Date Created in 22:56 2021-12-21
 */
public class ClassPathResource implements Resource{

    String path;

    public ClassPathResource(String path) {
        this.path = path;
    }

    @Override
    public InputStream getInputStream() throws IOException {
        return this.getClass().getClassLoader().getResource(path).openStream();
    }
}
